package com.demo.binder;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author: luobiao
 * @Date: 2023/11/8 09:24
 * @Description:
 */
@Component
public class Demo {
    private static String name;
    private static final String fname = "test";

    @Value("${spring.application.names:" + fname + "}")
    public void setName(String name) {
        Demo.name = name;
    }

    public static String getName(){
        return name;
    }
}
